<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<title>Attribute Info</title>

<link rel="STYLESHEET" type="text/css" href="./styles.css"/>

</head>

<body>

<!-- lz_content_start -->


<h1><a name="top">Using the Attribute Reference</a></h1>

<p>For more information on attributes in general, see an <a href="info-attributes.html">introduction
to attributes</a>. This document provides details on the attribute reference
section which appears below the general description of each LZX element. </p>


<p>For an XML attribute (an attribute "Tag" listed in its Usage column), the value of an attribute can be supplied as the value of an attribute in the XML header.  For example, the <code>view</code> tag is declared as having an <code>x</code> attribute.  The following code will initialize the <code>x</code> attribute of the view named "myview" to <literal>10</literal>:</p>

<code class="fragment">
&lt;view name="myview" x="10"/&gt;
</code>

<p>Most attributes can also be set using the <code>attribute</code> element.  (Exceptions are the <code>id</code> and <code>resource</code> attributes, and attributes of elements that do not correspond to LFC classes, such as <code>font</code>.)  For example, the previous example could also be written:</p>

<code class="fragment">
&lt;view name="myview"&gt;<br />
  &lt;attribute name="x" value="10"/&gt;<br />
&lt;/view&gt;
</code>



<hr size="1" bgcolor="#e5e5e5" />
<br /> 
<br /> <br /> <br /> <br /> <br />

<a name="name"></a>
<h2>Name</h2>
<p>The name of the attribute.</p>


<p align="right"><a href="#top">More on attributes</a></p>
<hr size="1" bgcolor="#e5e5e5" />
<br /> <br /> <br /> <br /> <br /> <br />


<a name="usage"></a>
<h2>Usage</h2>
<p>Describes whether an attribute may occur in an XML open tag, in JavaScript code that manipulates the properties of an object, or both.</p>
<dl>
<dt>Tag only</dt><dd>This attribute may be specified only in the element's XML tag.</dd>
<dt>JS only</dt><dd>This attribute is only available in JavaScript expressions or methods.</dd>
<dt>Tag &amp; JS</dt><dd>This attribute is available in both XML tag and Javascript.</dd>
</dl>
<p align="right"><a href="#top">More on attributes</a></p>
<hr size="1" bgcolor="#e5e5e5" />
<br /> <br /> <br /> <br /> <br /> <br />

<a name="typetag"></a>
<h2>Type (Tag)</h2>
<p>The XML type name of the attribute.</p>
<dl>
<dt>booleanLiteral</dt>
<dd><literal>true</literal> or <literal>false</literal></dd>
<dt>colorLiteral</dt>
<dd>A color of the form <literal>#hhh</literal>, <literal>#hhhhhh</literal>, <literal>rgb(rv, gv, bv)</literal> or a CSS color name, where <var>h</var> is a hexadecimal digit, <var>rv</var>, <var>gv</var>, and <var>bv</var> are numbers between 0.0 and 1.0 inclusive, and the CSS color names are from the table below.</dd>
</dl>

<table border="0">
<tr><td>black</td><td>000000</td><td style="background-color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
<tr><td>green</td><td>008000</td><td style="background-color: #008000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
<tr><td>silver</td><td>C0C0C0</td><td style="background-color: #C0C0C0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
<tr><td>lime</td><td>00FF00</td><td style="background-color: #00FF00">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
<tr><td>gray</td><td>808080</td><td style="background-color: #808080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
<tr><td>olive</td><td>808000</td><td style="background-color: #808000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
<tr><td>white</td><td>FFFFFF</td><td style="background-color: #FFFFFF">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
<tr><td>yellow</td><td>FFFF00</td><td style="background-color: #FFFF00">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
<tr><td>maroon</td><td>800000</td><td style="background-color: #800000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
<tr><td>navy</td><td>000080</td><td style="background-color: #000080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
<tr><td>red</td><td>FF0000</td><td style="background-color: #FF0000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
<tr><td>blue</td><td>0000FF</td><td style="background-color: #0000FF">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
<tr><td>purple</td><td>800080</td><td style="background-color: #800080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
<tr><td>teal</td><td>008080</td><td style="background-color: #008080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
<tr><td>fuchsia</td><td>FF00FF</td><td style="background-color: #FF00FF">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
<tr><td>aqua</td><td>00FFFF</td><td style="background-color: #00FFFF">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
</table>

<dl>
<dt>numberLiteral</dt>
<dd>An integer or floating-point number.</dd>
<dt>sizeLiteral</dt>
<dd>A non-negative number used as a size or dimension.</dd>
<dt>boolean</dt>
<dd>A booleanLiteral, or an <a href="attribute.html">${<var>expression</var>}</a>.</dd>
<dt>color</dt>
<dd>A colorLiteral, or an <a href="attribute.html">${<var>expression</var>}</a>.</dd>
<dt>script</dt>
<dd>A sequence of ECMAScript commands.</dd>
<dt>expression</dt>
<dd>An ECMAScript expression.</dd>
<dt>reference</dt>
<dd>An ECMAScript expression that evaluates to an Object reference.</dd>
<dt>number</dt>
<dd>A numberLiteral, or an <a href="attribute.html">${<var>expression</var>}</a> which evaluates to a number.</dd>
<dt>size</dt>
<dd>A sizeLiteral, or an <a href="attribute.html">${<var>expression</var>}</a> which evaluates to a non-negative number.</dd>
<dt>numberExpression</dt>
<dd>A numberLiteral, an <a href="attribute.html">${<var>expression</var>}</a> which evaluates to a number, or a JavaScript expression (which is treated the same as an ${<var>expression</var>}.</dd>
<dt>sizeExpression</dt>
<dd>A sizeLiteral, an <a href="attribute.html">${<var>expression</var>}</a> which evaluates to a non-negative number, or a JavaScript expression (which is treated the same as an ${<var>expression</var>}.</dd>
<dt>css</dt>
<dd>A CSS property value list, of the form <literal>key: value</literal> or <literal>key: value; key: value</literal>.</dd>
<dt>opacity</dt>
<dd>A number between 0.0 and 1.0 (inclusive), or an <a href="attribute.html">${<var>expression</var>}</a> which evaluates to such a number.</dd>
</dl>






<p align="right"><a href="#top">More on attributes</a></p>
<hr size="1" bgcolor="#e5e5e5" />
<br /> <br /> <br /> <br /> <br /> <br />
<a name="typejs"></a>
<h2>type (JS)</h2>
<p>JavaScript types start with a capital letter. These may be one of the native
  JavaScript types, listed below or an LZX class. </p>
<table width="100%" border="0" cellspacing="2">
  <tr valign="top">
    <td colspan="3"><p>Native JavaScript types (See <a href="http://www.mozilla.org/js/language/E262.pdf">ECMA-262</a> standard for more detail
      on these types)</p></td>
  </tr>
  <tr valign="top">
    <td width="5%"><p>&nbsp;</p></td>
    <td width="11%"><p>Boolean</p></td>
    <td width="84%"><p>true or false</p></td>
  </tr>
  <tr valign="top">
    <td><p>&nbsp;</p></td>
    <td><p>String</p></td>
    <td><p>single or double quotes may be used to specify a sequence of characters
        (e.g. var s = 'test' or var s = &quot;test&quot;</p></td>
  </tr>
  <tr valign="top">
    <td><p>&nbsp;</p></td>
    <td><p>Number</p></td>
    <td><p>used to specify simple values (e.g. var n = 4 or var n=4.2). Number
        type is also commonly used to specify a color, for which it is often
        convenient to use hexadecimal notation (e.g. var c = 0xFFFFFF for white,
        or 0x0099BB for turquoise)</p></td>
  </tr>
  <tr valign="top">
    <td><p>&nbsp;</p></td>
    <td><p>Array</p></td>
    <td><p>an ordered list of elements. The elements may be of any type and need
        not be of the same type.</p></td>
  </tr>
  <tr valign="top">
    <td colspan="3"><p>&nbsp;</p>
    <p>Notes on documentation:</p></td>
  </tr>
  <tr valign="top">
    <td><p>&nbsp;</p></td>
    <td><p>[LzNode]</p></td>
    <td><p>An LZX class enclosed in brackets indicates an Array of these types.</p>
    </td>
  </tr>
  <tr valign="top">
    <td><p>&nbsp;</p></td>
    <td><p>dictionary</p></td>
    <td><p>Also known as a hash, or JavaScript Object, the dictionary type indicates
        an unordered collection of name-value pairs. For example: {width:100,
        height:50, title:&quot;my title&quot;}</p>
    </td>
  </tr>
  <tr valign="top">
    <td><p>&nbsp;</p></td>
    <td><p>any</p></td>
    <td><p>JavaScript APIs will often allow a parameter of any type. This is indicated
      by the word &quot;any&quot; in the type collumn. </p>
      </td>
  </tr>
</table>
<p>&nbsp;</p>
<p align="right"><a href="#top">More on attributes</a></p>
<hr size="1" bgcolor="#e5e5e5" />
<br /> <br /> <br /> <br /> <br /> <br />


<a name="category"></a>
<h2>Category</h2>
<p>Clicking on the name of the category will take you to a description of that
  category. Here is a complete list of <a href="info-attributes.html#types">attribute
  types</a>.</p>
<p align="right"><a href="#top">More on attributes</a></p>
<hr size="1" bgcolor="#e5e5e5" />
<br /> <br /> <br /> <br /> <br /> <br /><br /> <br /> <br /> <br /> <br /> <br /><br /> <br /> <br /> <br /> <br /> <br /><br /> <br /> <br /> <br /> <br /> <br /><br /> <br /> <br /> <br /> <br /> <br /><br /> <br /> <br /> <br /> <br /> <br />







<!-- lz_content_end -->

</body>
</html>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2001-2004 Laszlo Systems, Inc.  All Rights Reserved.              *
* Use is subject to license terms.                                            *
* X_LZ_COPYRIGHT_END ****************************************************** -->
